package com.gxa.park.core.exception;


import com.gxa.park.core.commom.ExceptionCode;

/**
 * @ClassName BusinessException
 * @Description 表示在程序中出现的业务异常情况
 * @Author ds
 * @Date 2022/5/7 10:48
 * @Version 1.0
 */
public class BusinessException extends Exception{

    private ExceptionCode exceptionCode;

    public ExceptionCode getExceptionCode() {
        return exceptionCode;
    }

    /**
     *  利用枚举
     * @param exceptionCode 枚举对象
     */
    public BusinessException(ExceptionCode exceptionCode){
        super(exceptionCode.getMessage());
        this.exceptionCode=exceptionCode;
    }
}
